'''
Description: 
Author: HowsenFisher
Date: 2021-04-12 09:52:30
LastEditTime: 2021-04-12 11:18:33
LastEditors: liutq
Reference: 
'''
from Media.Video.VideoCatcher import VideoCatcher
from Media.Video.VideoReceiver import VideoReceiver
from Media.Voice.VoiceReceiver import VoiceReceiver
from Media.Voice.VoiceRecorder import VoiceRecorder
from multiprocessing import Process
from threading import Thread
import os
import time


def runVideoCatcher():
    a = VideoCatcher(None,"192.168.1.2",912)

def runVideoReceiver():
    b = VideoReceiver(None,"0.0.0.0",912)

def runVoiceSender():
    c = VoiceRecorder(None,"192.168.1.2",913)

def runVoiceReceiver():
    d = VoiceReceiver(None,"0.0.0.0",913)

if __name__ == '__main__':
    # myVideoCatcher = Process(target=runVideoReceiver)
    # myVideoReceiver = Process(target=runVideoCatcher)
    # myVideoCatcher.start()
    # myVideoReceiver.start()
    myVoiceReceiver = Thread(target=runVoiceReceiver)
    myVoiceSender = Thread(target=runVoiceSender)
    myVoiceReceiver.start()
    time.sleep(1)
    myVoiceSender.start()
    while True:
        pass